package com.cy.store.service;

import com.cy.store.domain.Address;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Administrator
 * @version 1.0
 * @description: TODO
 * @date 2025/2/22 19:09
 */
//关于地址的业务层接口
public interface IAddressService {
    /**
     *
     * @param uid (将来由控制层传递给业务层的uid)
     * @param username (修改或创建执行人)
     * @param address （地址信息）
     */
    void addNewAddress(Integer uid, String username, Address address);
    List<Address> getByUid(Integer uid);
    /**
     *修改某个用户的某条地址为默认地址
     * @param aid (地址id)
     * @param uid (用户id)
     * @param username (操作人)
     */
    void setDefault(Integer aid, Integer uid, String username);

    /**
     * 删除收货地址
     * @param aid
     * @param uid
     * @return
     */
    Integer delete(Integer aid, Integer uid, String username);

    Address getByAid(Integer aid, Integer uid);
}
